//编写一个函数，返回输入的数组的倒序，使用指针来实现。
#include <stdio.h>

void count(double* ar, int n);

int main(void)
{
	double mark[5] = { 1.0,2.0,9.0,4.0,5.0 };
	printf("this is a test program\n");
	count(mark, 5-1);
	return 0;
}

void count(double* ar, int n)//n是这个数组的项数-1。
{
	int circul;
	double temp;
	int m=(n/2);
	for (circul = 0; circul < m; circul++)
	{
		temp=*(ar + circul);
		*(ar + circul) = *(ar + (n - circul));
		*(ar + (n - circul)) = temp;
	}
	for (circul = 0; circul <= n; circul++)
		printf("%lf\n", *(ar + circul));
}